package com.hqq.http;

import java.util.HashMap;
import java.util.Map;

/**
 * View
 * 封装视图模型
 * Created by heqianqian on 2017/7/19.
 */
public class View {

    /**
     * 模型路径
     */
    private String viewPath;

    /**
     * 模型数据
     */
    private Map<String, Object> modelData;

    public View(String viewPath) {
        this.viewPath = viewPath;
        modelData = new HashMap<>();
    }

    /**
     * 添加模型数据
     * @param key 键
     * @param value 值
     */
    public void addModel(String key, Object value) {
        modelData.put(key, value);
    }

    public String getViewPath() {
        return viewPath;
    }

    public Map<String, Object> getModelData() {
        return modelData;
    }
}
